<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 500px;
        height: 200px;
        background-color: #000;
        margin-inline: auto;
        display: flex;
        justify-content: space-between;
     
      }
      .box-item {
        width: 100px;
        height: 100px;
      }
      .box-item:nth-child(1) {
        perspective: 1500px;
        background-color: rgb(214, 104, 104);
        rotate: y 45deg;
      }
      .box-item:nth-child(2) {
        perspective: 1500px;
        background-color: rgb(95, 189, 95);
        rotate: y -45deg;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="box-item">left</div>
      <div class="box-item">right</div>
    </div>
    <script></script>
  </body>
</html>
